package com.example.demo.exception;

import com.example.demo.exception.base.AbstractException;

/**
 * 远程Rpc调用运行时异常
 * @author hankChan
 *         2018/1/3 0003.
 */
public class RpcException extends AbstractException {

    private static final long serialVersionUID = 8002940312570471881L;

    public RpcException(String requestId, String msg) {
        super(requestId, msg);
        this.msg = "request_id=" + requestId + ",RpcException:$$$" + msg + "$$$";
    }

    public RpcException(String requestId, String code, String msg) {
        super(requestId, code, msg);
        this.code = code;
        this.msg = "request_id=" + requestId + ",RpcException:$$$" + msg + "$$$";
    }

    public String getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }
}
